<template>
  <div class="salary-container">
    <el-row type="flex" align="middle">
      <el-col :span="12">
        <h2>最新薪酬</h2>
      </el-col>
      <el-col :span="12">
        <div class="button-wrapper">
          <el-button type="primary" class="add-button" @click="goToAddSalary">添加薪酬</el-button>
        </div>
      </el-col>
    </el-row>
  </div>
</template>
<script>
import { useRouter } from 'vue-router'

export default {
  setup() {
    const router = useRouter()
    
    const goToAddSalary = () => {
      router.push('/addsalary')
    }
    
    return {
      goToAddSalary
    }
  }
}
   
</script>

<style scoped>
.salary-container {
  width: 100%;
  padding: 12px 0;
}

.salary-text {
  font-size: 16px;
  color: #000;
  font-weight: normal;
  line-height: 1.5;
}

.button-wrapper {
  display: flex;
  justify-content: flex-end;
}

.add-button {
  background-color: #409EFF;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
}

.add-button:hover {
  background-color: #66b1ff;
}
</style>